-
-
Notifications
You must be signed in to change notification settings - Fork 383
Remove @symfony/stimulus-testing
dev dependencies
#2879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@symfony/stimulus-testing
@symfony/stimulus-testing
@symfony/stimulus-testing
dev dependencies
102c0bb
to
6ccc009
Compare
So we only used two DOM-related methods from the (the ones you moved in the ../../../helper file) Are people using it to test their controllers ? |
000eb1a
to
68bdf65
Compare
Yes, and the
It always had few downloads per week (see stats), but since mid-May it started to grows to ~16k downloads per week. |
68bdf65
to
bbe6bd1
Compare
So maybe we can stop using it ourselves... and see then, depending on the activity, if we deprecate it ? |
Let's debate on https://github.com/symfony/stimulus-testing if you want, but for me there is no point to this library, either for maintainers or users. |
You cannot say « I suggest we deprecate » then say « Lets not dizcyss it » haha IF (and that is a big if) there is a growing usage of the lib, it deserves maybe to suggest them an alternative, and probably some documentation updates, that’s all i’m saying |
This PR was merged into the main branch. Discussion ---------- Deprecate the package I don't think there is any interest in _maintaining_ it anymore. Because of Jest and Babel, installing ``@symfony`/stimulus-testing` installs [**~500 subdependencies**](https://npmgraph.js.org/?q=%40symfony%2Fstimulus-testing), which is totally unacceptable, since the added-value of this package is only these two functions: ```js export function mountDOM(html = '') { const div = document.createElement('div'); div.innerHTML = html; document.body.appendChild(div); return div; } export function clearDOM() { document.body.innerHTML = ''; } ``` It's like a Composer package, but all its dependencies being shadowed and not removable by the final user. Removing it from `@symfony`/ux, where we don't use Jest and Babel but Vitest, allowed us to remove ~400 useless Node.js dev dependencies: symfony/ux#2879 The package is still experimental, and I suggest to deprecate this package. I've added migration steps for people being stuck with it, even if I think we, Symfony, are maybe the only ones to use it: https://github.com/user-attachments/assets/86a21c37-8560-43dc-bec9-0043875831ea We can observe: 1. it always had ~1k downloads per week this last year, 2. more recently we had ~21k downloads per week, and I believe that's correlated to my last two-months work on UX 3. and since a few days, it started to drop again (currently at 8k downloads for the last full week), when I removed it from UX Commits ------- 07d2209 Deprecate the package
I plan to deprecate
@symfony/stimulus-testing
, the library is too much opinionated by depending on Jest and Babel.From 837 to 442 (dev)dependencies 🎉